(define-module (logging)
  #:export (debug))


(define displayln
  (lambda* (#:key (output-port (current-output-port)) (form "a") (verbose #t) . msgs)
    (when verbose
      (display (string-append
                (string-join
                 (map (lambda (msg)
                        (simple-format #f (string-append "~" form) msg))
                      msgs)
                 " ") "\n")
               output-port))))


;; alias for displayln
(define debug displayln)
